import java.io.FileOutputStream;
import java.io.IOException;
import java.io.PrintStream;

/**
 * Created by dell on 2017/8/7.
 */
public class PrintStreamTest {
    public static void main(String[] args) throws IOException {
        try (
                FileOutputStream fos = new FileOutputStream("read.txt");
                PrintStream ps = new PrintStream(fos)) {
            ps.println("普通字符串");
            ps.println(new PrintStreamTest());
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
